package morenoapp.components.thinkgraphv2;

import java.awt.BorderLayout;
import javax.swing.JScrollPane;
import morenoapp.MorenoApp;
import morenoapp.components.thinkgraphv2.components.ThinkgraphDisplayConfigJPanel;
import morenoapp.model.view2.MorenoView2Face;

/**
 *
 * @author dmitry.mamonov
 */
public class ThinkgraphV2JPanel extends javax.swing.JPanel {
    

    /** Creates new form ThinkgraphV2JPanel */
    public ThinkgraphV2JPanel() {
        initComponents();
        initCustom();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        setName("Form"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    private void initCustom() {
        MorenoView2Face config = MorenoApp.getModel().getView();
        setLayout(new BorderLayout());
        add(new ThinkgraphUICanvas(config), BorderLayout.CENTER);
        
        JScrollPane jScrollPane = new JScrollPane(new ThinkgraphDisplayConfigJPanel(config));
        jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        add(jScrollPane, BorderLayout.EAST);
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
